local huxuan = fk.CreateSkill {
  name = "lingling__huxuan",
  tags = { Skill.Compulsory },
}

Fk:loadTranslationTable{
  ["lingling__huxuan"] = "胡旋",
  [":lingling__huxuan"] = "锁定技，当你受到伤害后，你摸两张牌并翻面，若翻至正面，你弃置三张牌。",
}

huxuan:addEffect(fk.Damaged, {
  anim_type = "masochism",
  on_use = function (self, event, target, player, data)
    local room = player.room
    player:drawCards(2, huxuan.name)
    if player.dead then return end
    player:turnOver()
    if player.dead then return end
    if player.faceup then
      room:askToDiscard(player, {
        min_num = 3,
        max_num = 3,
        include_equip = true,
        skill_name = huxuan.name,
        cancelable = false,
      })
    end
  end,
})

return huxuan
